package com.itheima.api_date.localdatetime;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.Month;

/**
 * @author Anomaly
 * @date 2022/12/29 17:15
 */
public class Test {
    public static void main(String[] args) {
        LocalDate now1 = LocalDate.now();
        System.out.println(now1);
        System.out.println(now1.getYear());
        System.out.println(now1.getMonth());
        System.out.println(now1.getMonthValue());
        System.out.println("=====================");
        LocalTime now2 = LocalTime.now();
        System.out.println(now2);
        System.out.println("========================");
        LocalDateTime now = LocalDateTime.now();
        System.out.println(now);
        LocalDateTime localDateTime = now.plusDays(20);
        System.out.println(localDateTime);
    }
}
